<template>
  <div class="son1">
      <h3>son1.vue</h3>
      <button @click="fn1">传递给son2</button>
      <p>{{ msg }}</p>
  </div>
</template>

<script>
// import bus from '../eventBus/index.js'

export default {
 
    data() {
        return {
            msg: 'son1马杀鸡'
        }
    },

    methods: {
    
        fn1 () {
            // 代表通过bus对象来传递
            this.$bus.$emit('xx', this.msg)
        }
    }
}
</script>

<style>
.son1 {
    width: 300px;
    height: 300px;
    border: 1px solid #000;
}
</style>